﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using Models;


namespace DAL
{
    /// <summary>
    /// 用户类别
    /// </summary>
    public class userTypeDAL
    {
        //下拉框
        public static List<Models.UserTypeID> liXlk()
        {
            string sql = "select * from tb_UserTypeID";
            SqlDataReader dr = SqlDBHelper.GetReader(sql);
            List<Models.UserTypeID> lis = new List<Models.UserTypeID>();
            while (dr.Read())
            {
                lis.Add(new Models.UserTypeID()
                {
                    TypeID = Convert.ToInt32(dr["UserTypeID"]),
                    Name = dr["Name"].ToString()
                });
            }
            dr.Close();
            return lis;
        }
    }
}
